<template>
  <div class="root">
    <span>{{n}}</span>
    <el-button type="primary" @click="add">+1</el-button>
  </div>
</template>

<script>
  export default {
    name: "App",
    data() {
      return {
        n: 0
      }
    },
    methods: {
      add() {
        this.n += 1
      }
    }
  }
</script>

<style scoped>
  .root {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }
</style>